package com.bnlr.lrparking.appui.search;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;

import com.bnlr.lrparking.R;
import com.bnlr.lrparking.base.BaseActivity;

/**
 * Created by hp on 2017/10/9.
 * 搜索返回结果界面
 */

public class SeachResulActivity extends BaseActivity {

    private String topseach;
    private EditText ed_seachresul;
    private ImageView img_search_back;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_seachresul);
        initView();
    }

    private void initView(){

        Intent intent=getIntent();
        topseach=intent.getStringExtra("topseach");
        ed_seachresul=(EditText)findViewById(R.id.ed_seachresul);
        ed_seachresul.setOnClickListener(this);
        ed_seachresul.setText(topseach);
        ed_seachresul.setSelection(ed_seachresul.length());
        img_search_back=(ImageView)findViewById(R.id.img_search_back);
        img_search_back.setOnClickListener(this);
    }

    /**
     * 搜索接口上传参数
     * 1.分类
     * 2.关键字
     * 3.城市id
     */
    private void setSeachListData(){

    }


    @Override
    public void onClick(View v) {
        super.onClick(v);
        switch (v.getId()){
            case R.id.img_search_back:
                finish();
                break;
            case R.id.ed_seachresul:
                finish();
                break;
        }
    }
}
